using System;
using System.Collections.Generic;
using System.Text;
using FireStarterModeller.BO;

namespace FireStarterModeller.Logic
{
    public class ProjectLoader: ILoader
    {
        private readonly IBoLoader _boLoader;

        public ProjectLoader(IBoLoader boLoader)
        {
            _boLoader = boLoader;
        }

        public IBoLoader BoLoader
        {
            get { return _boLoader; }
        }

        public DMSolution Solution
        {
            get
            {
                if (_boLoader.BusinessObjects.Count == 0) return null;
                return _boLoader.BusinessObjects[0] as DMSolution;
            }
        }

        public void Load()
        {
            _boLoader.Load();
        }
    }
}
